Build, test, and submit your app using Xcode, Apple's integrated development environment.

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
0
0
9.7k
May ’24
Xcode 16 Doesn't Display "Swift Compiler" Build Settings Sections
I am editing my iOS project in Xcode 16 and want to use the "Swift Compiler - Upcoming Features" section of the build settings to selectively enable the new Swift 6 language features. I have read the instructions for doing this and have dowloaded an Apple sample project and can see that section under the project and target-level Build Settings in the sample project However, when I open my Xcode project in XCode 16 that section does not appear. Is there any way for me to influence how Xcode 16 displays the build settings? In fact, no "Swift Compiler" sections appear at all under my project Build Settings (All | Combined). There is a "User-Defined" section that has the Swift Version, Compilation Mode and Optimization level. The project itself is several years old and was on a very old project version. I have upgraded my project document format to "Xcode 16" but it made no difference. I have compared my project and the sample project in a text editor and both seem to have similar structure. I tried removing unused and outdated settings from my project but that also had no effect. Is there an alternative to deleting my project file and adding the source files to it? I have a large project with multiple targets so that would be something I'd rather not do.
4
3
1.1k
3h
Xcode 26 CompileMetalFile failed
"EnableLiveAssetServerV2-com.apple.MobileAsset.MetalToolchain" = on; ProductName: macOS ProductVersion: 26.0.1 BuildVersion: 25A362 The MetalToolchain is installed, however I keep getting error that MetalToolchain cannot be found by the Xcode "Command CompileMetalFile failed with a nonzero exit code" error: error: cannot execute tool 'metal' due to missing Metal Toolchain; use: xcodebuild -downloadComponent MetalToolchain ❯ xcodebuild -downloadComponent MetalToolchain 2025-10-31 11:18:29.004 xcodebuild[6605:45524] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.324.0.k9JmEp” couldn’t be opened because you don’t have permission to view it. Beginning asset download... 2025-10-31 11:18:29.212 xcodebuild[6605:45523] IDEDownloadableMetalToolchainCoordinator: Failed to remount the Metal Toolchain: The file “com.apple.MobileAsset.MetalToolchain-v17.1.324.0.k9JmEp” couldn’t be opened because you don’t have permission to view it. Downloaded asset to: /System/Library/AssetsV2/com_apple_MobileAsset_MetalToolchain/4ab058bc1c53034b8c0a9baca6fba2d2b78bb965.asset/AssetData/Restore/022-17211-415.dmg Done downloading: Metal Toolchain 17A324.
8
3
1k
8h
Running an application for a simulator
My project is complete, I successfully compile the application, but when I try to run it on my simulator it gives an error, stating that the architecture is incorrect, even though it is parameterized for ARM architecture. Note: the application runs on my iPhone. Has anyone else had this problem?
3
0
50
13h
Archiving Catalyst project that embeds macOS tool
Hi! I have a Catalyst app that embeds command line utility. So the project has two targets: Catalyst target, this target depends on #2 and embeds it into its bundle. macOS target, the command line tool. Both targets have package dependency to the same package. I used this to embed the CMD tool. Everything builds, runs and works fine until I try to archive the project. Archiving stops early with such error: error: Multiple commands produce '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' note: Target 'MacrosForSwift' (project 'MacrosForSwift') has a command with output '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' note: Target 'MacrosForSwift' (project 'MacrosForSwift') has a command with output '/Users/kse2/Library/Developer/Xcode/DerivedData/PkgTest-clngkndczxoprpdlwefqqiqlryjt/Build/Intermediates.noindex/ArchiveIntermediates/PkgTest/IntermediateBuildFilesPath/UninstalledProducts/macosx/MacrosForSwift.o' What I have tried to fix archiving: Changing PkgTestCMD target to be on Catalyst/iOS instead of macOS. This works but I'm not sure how to properly run CMD tool with iOS SDK (if this correct at all): I need the main thread to be 'unblocked' and be active while background tasks exist. Adding an aux framework that act as container for the package. Doesn't work. Splitting targets into different projects, making workspace and cross-project reference. Doesn't work. My understanding is that archiving attempts to produce .o files for both Catalyst and macOS simultaneously, due to PkgTest being Catalyst and PkgTestCMD being macOS targets. How to archive such a project? Is there a way to separate archiving of CMD and main app? Maybe separate .o files into different directories. Simple building and running the project works, why archiving doesn't want to? I have a test project for the issue: PkgTest. main branch is the source project, DepFramework contains attempt #2, Workspace—#3. Thank you!
0
0
16
14h
There are still preview uploads in progress.
Hello everyone, I’m stuck with an App Store Connect issue and would really appreciate any insight from the community. I am unable to submit my app for review due to the following persistent error: “Unable to Add for Review – There are still preview uploads in progress.” What makes this particularly confusing is that there are no previews currently uploading. Here is everything I have already tried: Deleted all App Preview videos and all screenshots Confirmed Media Manager shows no active uploads Re-uploaded App Preview videos fully compliant with Apple specs: H.264 AAC stereo audio Constant 30 FPS Correct resolution Uploaded a new build with a higher build number (Build 3) Waited more than 24 hours after upload Logged out / logged in, refreshed, tried multiple browsers and sessions Confirmed TestFlight build upload completed successfully Despite all of this, the error persists and also prevents: Adding the app for review Creating a new app version (the “Add Version” button does not appear) Apple Developer Support has suggested submitting a higher build number, which I have done, but the issue remains. At this point, it seems like a stuck / ghost App Preview upload job on the App Store Connect backend. Has anyone experienced a similar issue? If so: How was it resolved? Did Apple need to manually clear or reset something on their side? Any advice would be greatly appreciated. Thank you in advance.
2
1
198
14h
Not seeing any AI/Agent options in Xcode 26.3
I've installed Xcode 26.3 on Sequoia 15.7.3 but I'm not seeing any of the AI options showing in Xcode that I see in usage/example videos. For example that AI icon in the top left hand corner isn't visible, and if I select Settings there is no Intelligence section, yet there is in all the demo videos. Why am I not seeing any of these new features?
1
1
43
15h
Document Type Export / Import in Xcode - Shared via Messages
I’ve created a document type for my app and set it up in the Info Configuration in Xcode. This all works as expected: Implemented with the Transferrable API and ShareLink, I can share an app’s file via the Files app or Notes and then import the file via a Share extension and the fileImport swiftUI api. My question is regarding Messages, specifically. It appears as a ShareLink option and I’m able to send my app’s document type via a message, but I’m unable to open it or share it (internally, with my app), other than being able to forward or delete it. If I copy the file, I can’t access it within my app (it’s still stored in the Messages private bundle) and startAccessingSecurityScopedResource returns false as expected. The message does detect the right icon, so it’s recognizing the custom document type. If my Share Extension, exported document type, and transferable implementation is configured correctly, should I be able to open a file for my app shared via Messages? Is this an allowed action? I get various answers from AI, and I can’t test this in the Simulator on pre-26 devices.
1
0
49
1d
USDZ model files when opened in Preview turns black
On macOS 26.2 (Tahoe), the Preview app fails to render many USDZ models correctly. The issue appears inconsistent: • Some USDZ files open normally in Preview • Some USDZ files open but the viewport turns completely black (no geometry, no material, no lighting) • All the same files open correctly when opened using “Open With → Xcode” This was not the behavior on macOS 15.7.2, where the exact same USDZ files rendered consistently in Preview without failures.
1
0
95
1d
BLE Advertising in Background
For our research study, it is essential that the app can advertise BLE packets even when the app is no longer in the foreground (for example, when it is in the app switcher / recents state). Is it supported to advertise BLE packets while the app is in the background or recents state? If so, what are the specific requirements or limitations we should be aware of (background modes, payload size, timing, etc.)? Are there any constraints that would prevent consistent BLE advertising for research use cases?
2
0
53
1d
Xcode 26.x Frequently Freezes During Breakpoint Debugging with Simulator
When I use Xcode 26 (0.1, 1) for debugging and hit a breakpoint, using "step over" causes the debugger to freeze at a random line of code. Clicking "Pause program execution" indicates that the line is being executed, but the breakpoint never exits, seemingly causing a freeze. The application on the simulator also becomes unresponsive. However, when I do not use breakpoints, my program runs smoothly, and debugging on a physical device does not cause any freezes. This issue only occurs with the simulator. I am using Xcode on Apple Silicon, and due to some third-party SDKs that depend on Rosetta, our app can only run on the Rosetta simulator. We did not encounter this issue when using Xcode 16.x for simulator debugging. The current situation with Xcode 26.x significantly reduces our development efficiency. What could be causing this, and is there a solution?
3
2
415
1d
iOS Simulator fails to boot (18.6 / 26.1 / 26.2) – launchd_sim could not bind to session
Hi, I’m facing a consistent simulator boot issue that appears to start after iOS 18.2 simulator runtimes and persists in 18.6, 26.1, and 26.2. Observed behavior iOS 18.2 simulator works fine iOS 18.6 simulator does NOT boot iOS 26.1 / 26.2 simulators do NOT boot Tried everything reinstall/clear cache and all and event formatted the system Unable to boot the Simulator NSPOSIXErrorDomain Code: 4 Failure Reason: Interrupted system call Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding macOS: Sequoia Xcode: 26.1, 26.2 Machine: Apple Silicon Unable to boot the Simulator. Domain: NSPOSIXErrorDomain Code: 4 Failure Reason: Interrupted system call User Info: { DVTErrorCreationDateKey = "2025-12-26 02:19:27 +0000"; IDERunOperationFailingWorker = "_IDEInstalliP.honeSimulatorWorker", Session = "com apple CoreSimulator.SimDevice CCDECA56-4A59-491B-A830-0F3928FCD957"; } Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding Domain: com.apple.SimLaunchHostService.RequestError Code: 4 Event Metadata: com.apple. dt. DERunOperationWorkerFinished : { "device_identifier" = "CCDECAE6-4A59-491B-A830-0E3928FCD957"; "device_model" = "iPhone18, 1"; "device_osBuild" = "26.1 (23B86)"; "device_osBuild_monotonic" = 2301008600; "device_os_variant" = 1; "device_platform" = "com apple.platform.iohonesimulator"; "device_platform_family" = 2; "device_reality" = 2; "device_thinningType" = "iPhone18,1"; "device_transport" = 4; "launchSession_schemeCommand" = Run; "launchSession_schemeCommand_enum" = 1; "launchSession_targetArch" = arm64; "launchSession_targetArch_enum" = 6; "operation_duration_ms" = 1183; "operation_errorCode" = 4; "operation_errorDomain" = NSPOSIXErrorDomain; "operation_errorWorker" = "_IDEInstalliPhoneSimulatorWorker"; "operation_error_reportable" = 1; "operation_name" = IDERunOperationWorkerGroup; "param_consoleMode" = 1; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com apple platform Please help on this as it got stuck. Thanks
5
5
584
1d
Application Hangs with Nested LazyVStack When Accessibility Inspector is Active
Description I've encountered a consistent hang/freeze issue in SwiftUI applications when using nested LazyVStack containers with Accessibility Inspector (simulator) or VoiceOver (physical device) enabled. The application becomes completely unresponsive and must be force-quit. Importantly, this hang occurs in a minimal SwiftUI project with no third-party dependencies, suggesting this is a framework-level issue with the interaction between SwiftUI's lazy view lifecycle and the accessibility system. Reproduction Steps I've created a minimal reproduction project available here: https://github.com/pendo-io/SwiftUI_Hang_Reproduction To Reproduce: Create a SwiftUI view with the following nested LazyVStack structure: struct NestedLazyVStackView: View { @State private var outerSections: [Int] = [] @State private var innerRows: [Int: [Int]] = [:] var body: some View { ScrollView { LazyVStack(alignment: .leading, spacing: 24) { ForEach(outerSections, id: \.self) { section in VStack(alignment: .leading, spacing: 8) { Text("Section #\(section)") // Nested LazyVStack LazyVStack(alignment: .leading, spacing: 2) { ForEach(innerRows[section] ?? [], id: \.self) { row in Text("Section #\(section) - Row #\(row)") .onAppear { // Load more data when row appears loadMoreInner(section: section) } } } } .onAppear { // Load more sections when section appears loadMoreOuter() } } } } } } Enable Accessibility Inspector in iOS Simulator: Xcode → Open Developer Tool → Accessibility Inspector Select your running simulator Enable Inspection mode (eye icon) Navigate to the view and start scrolling Result: The application hangs and becomes unresponsive within a few seconds of scrolling Expected Behavior The application should remain responsive when Accessibility Inspector or VoiceOver is enabled, allowing users to scroll through nested lazy containers without freezing. Actual Behavior The application freezes/hangs completely CPU usage may spike The app must be force-quit to recover The hang occurs consistently and is reproducible Workaround 1: Replace inner LazyVStack with VStack LazyVStack { ForEach(...) { section in VStack { // ← Changed from LazyVStack ForEach(...) { row in ... } } } } Workaround 2: Embed in TabView TabView { NavigationStack { NestedLazyVStackView() // ← Same nested structure, but no hang } .tabItem { ... } } Interestingly, wrapping the entire navigation stack in a TabView prevents the hang entirely, even with the nested LazyVStack structure intact. Questions for Apple Is there a known issue with nested LazyVStack containers and accessibility traversal? Why does wrapping the view in a TabView prevent the hang? Are there recommended patterns for using nested lazy containers with accessibility support? Is this a timing issue, a deadlock, or an infinite loop in the accessibility system? Why that happens? Reproduction Project A complete, minimal reproduction project is available at: https://github.com/pendo-io/SwiftUI_Hang_Reproduction
2
0
154
2d
Getting "Something went wrong" when changing Xcode version to 26.2 for a Xcode Cloud workflow
My workflow is using Xcode 16.4 and macOS Tahoe 26.2 (25C56). I am trying to change Xcode version to 26.2. When I click Save after some time I get "Something went wrong" error message without any additional details (see screenshot). I get the same error for the following cases: Tried changing a different workflow Tried to deactivate a workflow Tried various combinations of Xcode (26.1, 26.1.1, 26.2) + mac OS (26.1, 26.2) Tried creating a new workflow with Xcode 26.2 (haven't tried any other Xcode versions though)
0
0
11
2d
Using an API key with xcodebuild commands for Enterprise builds
Hey folks, Looking for some assistance with using an API key with xcodebuild commands to archive/export builds on our Enterprise developer account. The goal here is to allow Xcode to completely manage signing/certificates with our cloud distribution certificate, since these builds are happening in CI and we don't want to be manually handling user sessions/certificates on these machines. This is working great with our App Store account, but with our Enterprise account we're getting errors both archiving and exporting the builds. Here's an example of an export command that is giving errors: xcodebuild -exportArchive -exportOptionsPlist /path/to/exportOptions.plist -archivePath /path/to/archive.xcarchive -exportPath /path/to/export -authenticationKeyID *** -authenticationKeyIssuerID *** -authenticationKeyPath /path/to/key.p8 -allowProvisioningUpdates I've put some example values there, but we've double/triple checked the real values when this is actually running. These are the errors we're getting: 2026-02-02 12:30:04.022 xcodebuild[59722:1854348] DVTServices: Received response for 0794248F-E534-474D-ABBF-40C1375B6590 @ <https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA>. Error = Error Domain=DVTPortalResponseErrorDomain Code=0 "Communication with Apple failed" UserInfo={NSLocalizedDescription=Communication with Apple failed, NSLocalizedRecoverySuggestion=A non-HTTP 200 response was received (401) for URL https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA} 2026-02-02 12:30:04.173 xcodebuild[59722:1854348] DVTServices: Received response for 1D51FCD1-1876-4881-BE89-DD44E78EA776 @ <https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA>. Error = Error Domain=DVTPortalResponseErrorDomain Code=0 "Communication with Apple failed" UserInfo={NSLocalizedDescription=Communication with Apple failed, NSLocalizedRecoverySuggestion=A non-HTTP 200 response was received (401) for URL https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA} 2026-02-02 12:30:04.322 xcodebuild[59722:1854344] DVTServices: Received response for 25D7983F-1153-47C9-AE8A-03A8D10B6453 @ <https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA>. Error = Error Domain=DVTPortalResponseErrorDomain Code=0 "Communication with Apple failed" UserInfo={NSLocalizedDescription=Communication with Apple failed, NSLocalizedRecoverySuggestion=A non-HTTP 200 response was received (401) for URL https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA} 2026-02-02 12:30:04.483 xcodebuild[59722:1854344] DVTServices: Received response for 8A56C98B-E786-4878-856F-4D7E3D381DEA @ <https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA>. Error = Error Domain=DVTPortalResponseErrorDomain Code=0 "Communication with Apple failed" UserInfo={NSLocalizedDescription=Communication with Apple failed, NSLocalizedRecoverySuggestion=A non-HTTP 200 response was received (401) for URL https://appstoreconnect.apple.com/xcbuild/QH65B2/listTeams.action?clientId=XABBG36SBA} error: exportArchive Communication with Apple failed error: exportArchive No signing certificate "iOS Distribution" found We get very similar errors when archiving as well. Are we doing something incorrect here? Is API key usage with xcodebuild not supported for Enterprise builds? Appreciate any help y'all can provide!
0
3
59
2d
String Catalog stops updating upon changing source code
If you add a new string in your app (for example String(localized: "contact_support_message", defaultValue: "Please contact support")), then later you change that default value and rebuild, the string catalog updates to match as expected. But once that string is translated, changing the default value in code and rebuilding does not update the catalog. You seemingly have to go manually change the default value for English in the catalog to match the code (which marks the translation as Needs Review). Is there a better way? Or is there a way to determine what strings have default values in code that do not match the catalog values to see if any were missed as wording was tweaked over time?
3
0
129
2d
Xcode Cloud is unable to connect to the repository
Hello, I am trying out Xcode Cloud for the first time. I could connect to Github in the initial setup and had a few failed builds (package resolution error), which I resolved fairly quickly. Now whenever I am trying to build, I get the following error: Xcode Cloud is unable to connect to the repository “<respository-name>”. Reconnect the repository to resume builds. I am unable to remove the connection from settings as well because it's stuck in a loading state. Is there a way to fix this?
17
4
11k
2d
Scene-based Launch Detection
Our app supports UIScene. As a result, launchOptions in application(_:didFinishLaunchingWithOptions:) is always nil. However, the documentation mentions that UIApplication.LaunchOptionsKey.location should be present when the app is launched due to a location event. Given that our app is scene-based: How can we reliably determine whether the app was launched due to a location update, geofence, or significant location change? Is there a recommended pattern or API to detect this scenario in a Scene-based app lifecycle? This information is critical for us to correctly initialize location-related logic on launch. Relevant documentation: https://developer.apple.com/documentation/corelocation/cllocationmanager/startmonitoringsignificantlocationchanges()
0
0
33
2d
JSON Tutorial
HiSuppose i made a macOS App and want to connect to Oracle or mySQL Database I heard best way is using JSON which i dontknow anything about it, where can I find good reading about it thats specifically related to macOS or iOS Apps ?--Kindest Regards
3
0
435
2d
Help, I'm New and Lot
Hello, I created a code in Xcode on my Mac. Once it was debugged I tried to run it on a simulator. Every time I run it on a simulator I get the white screen with the spinning red box. I'm very new at this and I am creating this app for my own child. As a teacher I couldn't stand the other math fact apps. You'll have to talk to me like an infant.
1
0
80
3d